/*
 * 前端查询数据类汇总
 * @author: huangzong
 */
const C = require('../common/common.js')

class Setting {
    constructor () {
    }

    /*
   * 打开基础设置页面
   */
    async openSetting () {
        return await C.openBrowserWindow('/', {}, {
            transparent: true,
            frame: false,
            // openDevTools: true,
            width: 450,
            height: 320,
            useSpa: true,
            spaModel: 'setting'
        })
    }

    /*
   * 获取基础的配置
   */
    async getSetting () {
        return await C.ajax('/shop/basis/getBaseConfig')
    }

    /*
   * 设置基础配置
   */
    async setSetting (data) {
        return await C.ajax('/shop/basis/setBaseConfig', data, 'post')
    }
}

module.exports = new Setting()